One more instruction for the VMX MMIO decoder.
authorkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Sat, 10 Sep 2005 14:19:09 +0000 (14:19 +0000)
committerkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Sat, 10 Sep 2005 14:19:09 +0000 (14:19 +0000)
This patch is to handle the instruction with opcode 0x80.
Without this patch, the 64-bit VMX guest can't boot.

Signed-off-by: Chengyuan Li <chengyuan.li@intel.com>
xen/arch/x86/vmx_platform.c

index 9a4381ce2484653dbfa7db82cab7c4796d9d2729..fa3173b9b7be01453aaf8a0e7fc7986b98da7675 100644 (file)
@@ -425,10 +425,15 @@ static int vmx_decode(unsigned char *opcode, struct instruction *instr)
        GET_OP_SIZE_FOR_NONEBYTE(instr->op_size);
        return reg_mem(instr->op_size, opcode, instr, rex);
 
+    case 0x80:
     case 0x81:
        if (((opcode[1] >> 3) & 7) == 7) { /* cmp $imm, m32/16 */
            instr->instr = INSTR_CMP;
-           GET_OP_SIZE_FOR_NONEBYTE(instr->op_size);
+
+        if (opcode[0] == 0x80)
+            GET_OP_SIZE_FOR_BYTE(instr->op_size);
+        else
+            GET_OP_SIZE_FOR_NONEBYTE(instr->op_size);
 
            instr->operand[0] = mk_operand(instr->op_size, 0, 0, IMMEDIATE);
            instr->immediate = get_immediate(vm86, opcode+1, BYTE);